-- GENERATED SPELL FOR [Razorfen Spearhide] --


function spell0_4438(pUnit, Event) --@Thorns Aura,n/a--
pUnit:FullCastSpellOnTarget(8148,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4438', 0, 1)
end

function spell1_4438(pUnit, Event) --@Whirling Barrage,Self--
pUnit:FullCastSpellOnTarget(8259,pUnit)
pUnit:RegisterEvent('Sorts_4438', 1500, 1)
end

function Sorts_4438(pUnit, Event)
local choix_sorts_4438 = math.random(0, 1)
if choix_sorts_4438 == 0 then
pUnit:RegisterEvent('spell0_4438', 1, 1)
end
if choix_sorts_4438 == 1 then
pUnit:RegisterEvent('spell1_4438', 1, 1)
end
end

function mob4438_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4438', math.random(1500, 3000), 1)
end

function mob4438_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4438_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4438_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4438, 1, 'mob4438_Action')
RegisterUnitEvent(4438, 2, 'mob4438_Leave')
RegisterUnitEvent(4438, 3, 'mob4438_Kill')
RegisterUnitEvent(4438, 4, 'mob4438_Die')
